package com.fnzn.entranceGuard.entity.power;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import io.swagger.models.auth.In;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author sxf
 * @since 2019-01-03
 */
@Data
@TableName("power_hour")
public class PowerHour extends Model<PowerHour> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @TableField("device_id")
    private String deviceId;
    @TableField("power_id")
    private String powerId;
    /**
     * 日期 20190101
     */
    private String date;
    /**
     * 时刻
     */
    private Integer hour;
    /**
     * 总电量 kwh
     */
    private BigDecimal power;

    @TableField("max_power")
    private Integer maxPower;
    /**
     * 最小功率
     */
    @TableField("min_power")
    private Integer minPower;
    @TableField("create_time")
    private Date createTime;
    @TableField("update_time")
    private Date updateTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "PowerHour{" +
        ", id=" + id +
        ", date=" + date +
        ", hour=" + hour +
        ", power=" + power +
        ", maxPower=" + maxPower +
        ", minPower=" + minPower +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        "}";
    }
}
